import { Navigate } from "react-router-dom";
import MainMenu from "./MainMenu";
import AssignDemo from "./components/JsUse/AssignDemo";
import AwaitandAsync from "./components/JsUse/AwaitandAsync";
import InputdemoRef from "./components/ReactUse/Input/InputdemoRef";
import InputdemoState from "./components/ReactUse/Input/InputdemoState";
import JsonDatause from "./components/JsonUse/JsonDatause";
import ObjectStatechange from "./components/ReactUse/ObjectStatechange";
import SetStatedemo from "./components/ReactUse/SetStatedemo";
import TableUse from "./components/AntdUse/TableAntd/TableUse";
import CopytoClipboard from "./components/functionDevelopment/CopytoClipboard";
import TableSortingandscreening from "./components/AntdUse/TableAntd/TableSortingandscreening";
import ObjectPush from "./components/JsUse/ObjectPush";
import SwitchChange from "./components/AntdUse/SwitchChange";
import Parent from "./ValueTransmission/Parent";
import ExportExcel from "./components/functionDevelopment/ExportExcel";
import TablefieldFuzzyQuery from "./components/AntdUse/TableAntd/TablefieldFuzzyQuery";
import UseStateClass from "./components/Hooks/UseStateClass";
import UseStateFun from "./components/Hooks/useStateFun";
import UseEffectClass from "./components/Hooks/UseEffectClass";
import UseEffectFun from "./components/Hooks/UseEffectFun";
import TableJSONUse from "./components/AntdUse/TableAntd/TableJSONUse";
import UseRefClass from "./components/Hooks/UseRefClass";
import UseRefFun from "./components/Hooks/UseRefFun";
import FragmentComponent from "./components/ReactUse/FragmentComponent";
import ContextComponent from "./components/ReactUse/ContextComponent";
import ChangeOptimizePureComponent from "./components/ReactUse/ChangeOptimizePureComponent";
import ChangeOptimizeShouldComponentUpdate from "./components/ReactUse/ChangeOptimizeShouldComponentUpdate";
import ErrorBoundaryComponent from "./components/ReactUse/ErrorBoundaryComponent";
import Slot from "./components/ReactUse/Slot";
import Communication from "./components/ReactUse/communication/Communication";
import UseReducerFun from "./components/Hooks/UseReducerFun";
import MouseUse from "./components/JsUse/event/MouseUse";
import Html2canvas from "./components/functionDevelopment/Html2canvas";
import DomToImage from "./components/functionDevelopment/DomToImage";
import JsonView from "./components/functionDevelopment/JsonView";
import CardSort from "./components/functionDevelopment/listSort";
import BaseForm from "./components/AntdUse/FormAntd/BaseForm";
import CombineForms from "./components/AntdUse/FormAntd/CombineForms";
import ChinaColor from "./components/EchartsUse/ChinaColor";
import EchartsBase from "./components/EchartsUse/EchartsBase";
import WorldMap from "./components/EchartsUse/WorldMap";
import TitleSwitch from "./components/EchartsUse/TitleSwitch";
import Lodash from "./components/functionDevelopment/Lodash";
import CSSModules from "./components/CSSModules/CSSModules";
import LazyLoadComponent from "./components/ReactUse/LazyLoad";
import LazyLoadAbout from "./components/ReactUse/LazyLoad/LazyLoadAbout";
import LazyLoadHome from "./components/ReactUse/LazyLoad/LazyLoadHome";
import WebsocketUse from "./components/JsUse/Websocket/WebsocketUse";
import GeolocationUse from "./components/JsUse/GeolocationUse";
import ProgressiveImageReact from "./components/functionDevelopment/ProgressiveImage";
import ShadowStyle from "./components/EchartsUse/ShadowStyle";
import CryptoJS from "./components/functionDevelopment/CryptoJS";
import ChangeFavicon from "./components/JsUse/ChangeFavicon";
import ColorThiefUse from "./components/functionDevelopment/ColorThiefUse";
import TableAxios from "./components/AntdUse/TableAntd/TableAxios";
import TableDynamicField from "./components/AntdUse/TableAntd/TableDynamicField";
import UseRouteHooks from "./components/Hooks/UseRouteHooks";
import Tesseract from "./components/functionDevelopment/Tesseract";

// // routes数组中存储着所有的路由配置，每一个路由配置都是一个对象
const routes = [
    { path: "/", element: <Navigate to="mainMenu" /> },
    { path: "/MainMenu", element: <MainMenu /> },
    { path: "/AssignDemo", element: <AssignDemo /> },
    { path: "/AwaitandAsync", element: <AwaitandAsync /> },
    { path: "/InputdemoRef", element: <InputdemoRef /> },
    { path: "/InputdemoState", element: <InputdemoState /> },
    { path: "/JsonDatause", element: <JsonDatause /> },
    { path: "/ObjectPush", element: <ObjectPush /> },
    { path: "/ObjectStatechange", element: <ObjectStatechange /> },
    { path: "/SetStatedemo", element: <SetStatedemo /> },
    { path: "/TableUse", element: <TableUse /> },
    { path: "/TableJSONUse", element: <TableJSONUse /> },
    { path: "/CopytoClipboard", element: <CopytoClipboard /> },
    { path: "/TableSortingandscreening", element: <TableSortingandscreening /> },
    { path: "/TablefieldFuzzyQuery", element: <TablefieldFuzzyQuery /> },
    { path: "/SwitchChange", element: <SwitchChange /> },
    { path: "/Parent", element: <Parent /> },
    { path: "/LazyLoad/*", element: <LazyLoadComponent /> },
    { path: "/UseStateClass", element: <UseStateClass /> },
    { path: "/UseStateFun", element: <UseStateFun /> },
    { path: "/UseEffectClass", element: <UseEffectClass /> },
    { path: "/UseEffectFun", element: <UseEffectFun /> },
    { path: "/UseRefClass", element: <UseRefClass /> },
    { path: "/UseRefFun", element: <UseRefFun /> },
    { path: "/Fragment", element: <FragmentComponent /> },
    { path: "/Context", element: <ContextComponent /> },
    { path: "/ExportExcel", element: <ExportExcel /> },
    { path: "/ChangeOptimizePureComponent", element: <ChangeOptimizePureComponent /> },
    { path: "/ChangeOptimizeShouldComponentUpdate", element: <ChangeOptimizeShouldComponentUpdate /> },
    { path: "/ErrorBoundary", element: <ErrorBoundaryComponent /> },
    { path: "/Slot", element: <Slot /> },
    { path: "/useReducerFun", element: <UseReducerFun /> },
    { path: "/mouseUse", element: <MouseUse /> },
    { path: "/Communication", element: <Communication /> },
    { path: "/html2canvas", element: <Html2canvas /> },
    { path: "/DOMtoImage", element: <DomToImage /> },
    { path: "/JsonView", element: <JsonView /> },
    { path: "/ReactDnd", element: <CardSort /> },
    { path: "/BaseForm", element: <BaseForm /> },
    { path: "/CombineForms", element: <CombineForms /> },
    { path: "/EchartsBase", element: <EchartsBase /> },
    { path: "/ChinaColor", element: <ChinaColor /> },
    { path: "/WorldMap", element: <WorldMap /> },
    { path: "/TitleSwitch", element: <TitleSwitch /> },
    { path: "/Lodash", element: <Lodash /> },
    { path: "/CSSModules", element: <CSSModules /> },
    { path: "/WebsocketUse", element: <WebsocketUse /> },
    { path: "/geolocation", element: <GeolocationUse /> },
    { path: "/ProgressiveImage", element: <ProgressiveImageReact /> },
    { path: "/ShadowStyle", element: <ShadowStyle /> },
    { path: "/CryptoJS", element: <CryptoJS /> },
    { path: "/ChangeFavicon", element: <ChangeFavicon /> },
    { path: "/ColorThiefUse", element: <ColorThiefUse /> },
    { path: "/TableAxios", element: <TableAxios /> },
    { path: "/TableDynamicField", element: <TableDynamicField /> },
    { path: "/UseRouteHooks", element: <UseRouteHooks /> },
    { path: "/UseRouteHooksParams", element: <UseRouteHooks /> },
    { path: "/UseTesseract", element: <Tesseract /> },
];

export default routes;
